<?php

use Illuminate\Support\Facades\Route;
use App\Admin\Controllers\AuthController;
use WpLogin\Login\Http\Controllers;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', [AuthController::class, 'checkInstall']);
Route::post('/mango/install', [AuthController::class, 'install']);

// 用来返回页面，打开此路由，即可看到微信菜单管理界面
Route::get('/wechat-menu', 'App\Http\Controllers\MpWxConfigApiController@htmlContent');
// 插件用来处理页面中的 ajax 请求
Route::any('/wechat-menu/resources', 'App\Http\Controllers\MpWxConfigApiController@wechatMenuAjax');
// 微信回调，在公众号中设置到这个路由。如果你项目中已经有了这个，可自行处理
Route::any('serve', 'App\Http\Controllers\MpWxConfigApiController@wechatServe');
Route::get('/addons/login/images/{filename}', Controllers\LoginController::class.'@getImage');